package com.hqq.http;


import com.hqq.util.CastUtil;

import java.util.Map;

/**
 * Param
 * 封装返回的参数信息
 * Created by heqianqian on 2017/7/19.
 */
public class Param {

    private Map<String, Object> PARAM_MAP;

    public Param(Map<String, Object> PARAM_MAP) {
        this.PARAM_MAP = PARAM_MAP;
    }

    public Map<String, Object> getPARAM_MAP() {
        return PARAM_MAP;
    }

    /**
     * 根据参数名获取Int类型参数
     *
     * @param name 参数名
     * @return Int 类型参数
     */
    public int getInt(String name) {
        return CastUtil.castInt(PARAM_MAP.get(name));
    }
}

